/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      binary;
    class       volScalarField;
    location    "0/solid";
    object      rhoc;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [ 0 -3 1 0 0 1 0 ];

internalField   uniform 0;

boundaryField
{
    solid_left
    {
        type            fixedValue;
        value           uniform 0;
    }
    solid_bottom
    {
        type            fixedValue;
        value           uniform 0;
    }
    solid_right
    {
        type            fixedValue;
        value           uniform 0;
    }
    actuator1_surface
    {
        type            zeroGradient;
    }
    actuator2_surface
    {
        type            codedFixedValue;
        value           uniform 1;
        redirectType    myGaussDistribution;
        code            #{
                    // G(x) = exp(-(x-w)^2 / (2*sigma^2))
                    scalar w = 0.0605, sigma = 0.003; //input values

                    const vectorField& Cf = patch().Cf();
                    scalarField& Vf = *this;

                    forAll(Cf, faceI)
                    {
                        scalar x = Cf[faceI].x();
                        Vf[faceI] = exp(-pow(x-w, 2) / (2.0*pow(sigma,2)));
                    }
                #};
        codeOptions     #{
                    -I$(WM_PROJECT_DIR)/src/finiteVolume/lnInclude \
                    -I$(WM_PROJECT_DIR)/src/meshTools/lnInclude
                #};
        codeInclude     #{
                    #include "fvCFD.H"
                    #include <cmath>
                    #include <iostream>
                #};
    }
    frontback
    {
        type            empty;
    }
    solid_to_air
    {
        type            compressible::turbulentTemperatureCoupledBaffleMixed;
        Tnbr            rhoc;
        kappaMethod     lookup;
        kappa           epsField;
        value           uniform 0;
    }
}


// ************************************************************************* //
